package com.zkthink.ceres.promotion.service;

import com.zkthink.base.R;
import com.zkthink.base.service.SuperService;
import com.zkthink.ceres.promotion.entity.Promotion;
import com.zkthink.ceres.promotion.vo.admin.PromotionAdminVO;
import com.zkthink.ceres.promotion.vo.web.PromotionShowVO;
import com.zkthink.ceres.promotion.vo.web.PromotionVO;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 业务接口
 * 营销活动表
 * </p>
 *
 * @author kellen
 * @date 2020-06-16
 */
public interface PromotionService extends SuperService<Promotion> {

    /**
     * 根据商品id查询关联的活动
     * @param productId
     * @return
     */
    List<PromotionShowVO> findPromotionListByProductId(Long productId);

    /**
     * 批量查询营销活动信息
     * @param mid
     * @param promotionIds
     * @return
     */
    R<List<PromotionVO>> findPromotionList(Long mid, String promotionIds);

    /**
     * 根据商品id列表查询关联的活动
     * @param productIdList
     * @return
     */
    Map<Long,List<PromotionVO>> findPromotionDetail(Long mid, Set<Long> productIdList);

    /**
     * 查询商品是否和活动匹配
     * @param promotionId
     * @param productIdSet
     * @return
     */
    Map<Long,Boolean> matchPromotion(Long promotionId, Set<Long> productIdSet);
}
